<%@ page contentType="text/html" pageEncoding="UTF-8" language="java"%>﻿
<%@include file="/WEB-INF/jsp/header.jsp" %>
<section>
  <form action="/pari/index.htm" method="post">
    <fieldset>
      <legend>Parier</legend>
      <p>Pari pour : ${bet.name}</p>
      <p>
        <label>Montant parié <span class="required">*</span> :</label>
        <input type="number" min="0" max="1000" step="0.1" value="0" name="amount"/>
      </p>
      <p>
        <label>Choix <span class="required">*</span> :</label>
        <c:forEach items="${choices}" var="ch">
          <input type="radio" name="choice" value="<c:out value="${ch.id}"/>" required="required" />
          <label>${ch.label}</label>
        </c:forEach>
      </p>
      <p>
        <input type="hidden" name="userId" value="<sec:authentication property="principal.id"/>"/>
        <input type="hidden" name="betId" value="${bet.id}"/>
        <input type="submit" name="submit" value="Parier !" >
      </p>
    </fieldset>
  </form>
</section>
<%@include file="/WEB-INF/jsp/footer.jsp" %>
